Gunmen "hired by a foreign entity" carried out a series of recent shootings targeting synagogues and other sites in Toronto, an official says.